package vip.ola.core.common.config;

import org.jasypt.encryption.StringEncryptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import vip.ola.core.common.util.JasyptUtil;

/**
 * 配置文件加密配置
 *
 * @author whitegold
 * @date 2020-06-10 17:02
 */
@Configuration
public class JasyptConfig {

    @Bean("jasyptStringEncryptor")
    public StringEncryptor stringEncryptor() {
        return JasyptUtil.createStringEncryptor();
    }
}
